package com.bigfish.gbs.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author Joycessh
 * @Description
 * @Date 12/25/18 12:00 AM
 */
public class DateUtil {

    private static final Logger LOGGER = LoggerFactory.getLogger(MD5Util.class);

    private static Date date;

    /**
     * 方法说明
     * @author Joycessh
     * @param string
     * @return java.util.Date
     * @date 12/25/18 12:33 AM
     */
    public static Date strToDate(String string) {

        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            date = sdf.parse(string);
        }catch (ParseException e) {
            e.printStackTrace();
        }
        return date;
    }
}
